﻿{
	"ProcessTemplates": [
		{
			"Name": "JSON file from SFTP to MySQL database INSERT",
			"Modified": "2024-05-03T11:38:12.9711864",
			"Modifier": "jefim.borissov@frends.com",
			"Tags": [
				"JSON",
				"SFTP",
				"MySql"
			],
			"TemplateProcessTags": [],
			"Description": "This Process will download a JSON file from an SFTP server and insert the data into a MySQL database table.",
			"Version": 1,
			"UniqueIdentifier": "5fa1347a-7ba2-4eae-8418-7bfe5e8d13a7",
			"ProcessVariablesJson": "{\"FilePath\":{\"Value\":\"\\\"/test/\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Path to JSON file on SFTP server.\"},\"FileName\":{\"Value\":\"\\\"contact.json\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Name of JSON file containing data to be inserted into database.\"},\"ServerAddress\":{\"Value\":\"\\\"example.org\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"SFTP server address.\"},\"ServerUser\":{\"Value\":\"\\\"user\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"SFTP server user.\"},\"ServerPassword\":{\"Value\":\"\\\"password\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"SFTP server user's password.\"},\"TableName\":{\"Value\":\"\\\"Contact\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Name of table to be used in MySQL for inserting data into.\"},\"ConnectionString\":{\"Value\":\"\\\"connectionstring\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"Connection string for the MySQL database.\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "JSON file from SFTP to MySQL database INSERT",
					"Modified": "2024-05-03T11:38:12.9711864",
					"Modifier": "jefim.borissov@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This Process will download a JSON file from an SFTP server and insert the data into a MySQL database table.",
					"Version": 1,
					"UniqueIdentifier": "a2c2158f-dcb0-442b-8479-a65834c912af",
					"GraphJson": null,
					"Bpmn": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"sample-diagram\" targetNamespace=\"http://bpmn.io/schema/bpmn\" xsi:schemaLocation=\"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd\"><bpmn2:process id=\"Process_1\" isExecutable=\"false\"><bpmn2:endEvent id=\"Event_1ilu88r\"><bpmn2:incoming>Flow_0rkhxxk</bpmn2:incoming></bpmn2:endEvent><bpmn2:startEvent id=\"StartEvent_1\" name=\"Manual Trigger\"><bpmn2:outgoing>Flow_0pdno6e</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_1t3j2vx\" name=\"Read JSON file from SFTP\"><bpmn2:incoming>Flow_0pdno6e</bpmn2:incoming><bpmn2:outgoing>Flow_0hrntp0</bpmn2:outgoing><bpmn2:property id=\"Property_1qc75f2\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_17r5rlk\"><bpmn2:sourceRef>DataObjectReference_0ksp4rn</bpmn2:sourceRef><bpmn2:targetRef>Property_1qc75f2</bpmn2:targetRef></bpmn2:dataInputAssociation><bpmn2:standardLoopCharacteristics /></bpmn2:task><bpmn2:exclusiveGateway id=\"Gateway_14nb58k\" name=\"File read successful?\" default=\"Flow_1rh9p75\"><bpmn2:incoming>Flow_0hrntp0</bpmn2:incoming><bpmn2:outgoing>Flow_1rh9p75</bpmn2:outgoing><bpmn2:outgoing>Flow_0yj7ww3</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:dataObjectReference id=\"DataObjectReference_0ksp4rn\" name=\"JSON file\" dataObjectRef=\"DataObject_041f33u\" /><bpmn2:dataObject id=\"DataObject_041f33u\" /><bpmn2:intermediateThrowEvent id=\"Event_0c1ctz8\" name=\"Throw an error if read was not successful\"><bpmn2:incoming>Flow_1rh9p75</bpmn2:incoming><bpmn2:signalEventDefinition id=\"SignalEventDefinition_1yiezwp\" /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_0pdno6e\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_1t3j2vx\" /><bpmn2:sequenceFlow id=\"Flow_0hrntp0\" sourceRef=\"Activity_1t3j2vx\" targetRef=\"Gateway_14nb58k\" /><bpmn2:sequenceFlow id=\"Flow_1rh9p75\" name=\"no\" sourceRef=\"Gateway_14nb58k\" targetRef=\"Event_0c1ctz8\" /><bpmn2:subProcess id=\"Activity_1qerhv6\" name=\"For each data row\"><bpmn2:incoming>Flow_0ofbzrz</bpmn2:incoming><bpmn2:outgoing>Flow_0rkhxxk</bpmn2:outgoing><bpmn2:multiInstanceLoopCharacteristics isSequential=\"true\" /><bpmn2:startEvent id=\"Event_1bt2saf\"><bpmn2:outgoing>Flow_1ibjymp</bpmn2:outgoing><bpmn2:outgoing>Flow_0lioopv</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_0iji20v\" name=\"Execute INSERT Statement\"><bpmn2:incoming>Flow_19uxd9r</bpmn2:incoming><bpmn2:incoming>Flow_0jrs4l2</bpmn2:incoming><bpmn2:outgoing>Flow_1dm36u1</bpmn2:outgoing><bpmn2:standardLoopCharacteristics /></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_1ibjymp\" sourceRef=\"Event_1bt2saf\" targetRef=\"Activity_17dg0px\" /><bpmn2:scriptTask id=\"Activity_17dg0px\" name=\"Create query\"><bpmn2:incoming>Flow_1ibjymp</bpmn2:incoming><bpmn2:outgoing>Flow_0jrs4l2</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:scriptTask id=\"Activity_06yxlvm\" name=\"Create query parameters\"><bpmn2:incoming>Flow_0lioopv</bpmn2:incoming><bpmn2:outgoing>Flow_19uxd9r</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_19uxd9r\" sourceRef=\"Activity_06yxlvm\" targetRef=\"Activity_0iji20v\" /><bpmn2:endEvent id=\"Event_0otsupi\"><bpmn2:incoming>Flow_00wo7mm</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_1dm36u1\" sourceRef=\"Activity_0iji20v\" targetRef=\"Gateway_09qut53\" /><bpmn2:exclusiveGateway id=\"Gateway_09qut53\" name=\"Was the insert successful?\" default=\"Flow_0jm9k12\"><bpmn2:incoming>Flow_1dm36u1</bpmn2:incoming><bpmn2:outgoing>Flow_00wo7mm</bpmn2:outgoing><bpmn2:outgoing>Flow_0jm9k12</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_00wo7mm\" name=\"yes\" sourceRef=\"Gateway_09qut53\" targetRef=\"Event_0otsupi\" /><bpmn2:intermediateThrowEvent id=\"Event_143fjei\" name=\"Throw an error if insert was not successful\"><bpmn2:incoming>Flow_0jm9k12</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_0jm9k12\" name=\"no\" sourceRef=\"Gateway_09qut53\" targetRef=\"Event_143fjei\" /><bpmn2:sequenceFlow id=\"Flow_0lioopv\" sourceRef=\"Event_1bt2saf\" targetRef=\"Activity_06yxlvm\" /><bpmn2:sequenceFlow id=\"Flow_0jrs4l2\" sourceRef=\"Activity_17dg0px\" targetRef=\"Activity_0iji20v\" /></bpmn2:subProcess><bpmn2:task id=\"Activity_1ld00yp\" name=\"Parse JSON\"><bpmn2:incoming>Flow_0yj7ww3</bpmn2:incoming><bpmn2:outgoing>Flow_0ofbzrz</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0yj7ww3\" name=\"yes\" sourceRef=\"Gateway_14nb58k\" targetRef=\"Activity_1ld00yp\" /><bpmn2:sequenceFlow id=\"Flow_0ofbzrz\" sourceRef=\"Activity_1ld00yp\" targetRef=\"Activity_1qerhv6\" /><bpmn2:sequenceFlow id=\"Flow_0rkhxxk\" sourceRef=\"Activity_1qerhv6\" targetRef=\"Event_1ilu88r\" /><bpmn2:group id=\"Group_168041r\" categoryValueRef=\"CategoryValue_0ilgsb4\" /><bpmn2:group id=\"Group_04vv671\" categoryValueRef=\"CategoryValue_053klue\" /></bpmn2:process><bpmn2:category id=\"Category_1gxmhik\"><bpmn2:categoryValue id=\"CategoryValue_0ilgsb4\" value=\"Insert data into MySQL database table\" /></bpmn2:category><bpmn2:category id=\"Category_0w0kups\"><bpmn2:categoryValue id=\"CategoryValue_053klue\" value=\"Read JSON from SFTP server\" /></bpmn2:category><bpmndi:BPMNDiagram id=\"BPMNDiagram_1\"><bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Process_1\"><bpmndi:BPMNShape id=\"Event_1ilu88r_di\" bpmnElement=\"Event_1ilu88r\"><dc:Bounds x=\"1412\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" bpmnElement=\"StartEvent_1\"><dc:Bounds x=\"242\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"224\" y=\"276\" width=\"75\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1t3j2vx_di\" bpmnElement=\"Activity_1t3j2vx\"><dc:Bounds x=\"310\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_14nb58k_di\" bpmnElement=\"Gateway_14nb58k\" isMarkerVisible=\"true\"><dc:Bounds x=\"445\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"441\" y=\"196\" width=\"58\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataObjectReference_0ksp4rn_di\" bpmnElement=\"DataObjectReference_0ksp4rn\"><dc:Bounds x=\"342\" y=\"342\" width=\"36\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"337\" y=\"399\" width=\"47\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0c1ctz8_di\" bpmnElement=\"Event_0c1ctz8\"><dc:Bounds x=\"452\" y=\"349\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"430\" y=\"392\" width=\"81\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1qerhv6_di\" bpmnElement=\"Activity_1qerhv6\" isExpanded=\"true\"><dc:Bounds x=\"740\" y=\"110\" width=\"590\" height=\"310\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1bt2saf_di\" bpmnElement=\"Event_1bt2saf\"><dc:Bounds x=\"780\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_13qe2ar\" bpmnElement=\"Activity_0iji20v\"><dc:Bounds x=\"1020\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_17dg0px_di\" bpmnElement=\"Activity_17dg0px\"><dc:Bounds x=\"870\" y=\"150\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_06yxlvm_di\" bpmnElement=\"Activity_06yxlvm\"><dc:Bounds x=\"870\" y=\"280\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0otsupi_di\" bpmnElement=\"Event_0otsupi\"><dc:Bounds x=\"1252\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_09qut53_di\" bpmnElement=\"Gateway_09qut53\" isMarkerVisible=\"true\"><dc:Bounds x=\"1155\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1145\" y=\"196\" width=\"70\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_143fjei_di\" bpmnElement=\"Event_143fjei\"><dc:Bounds x=\"1162\" y=\"332\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1140\" y=\"375\" width=\"81\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Flow_1ibjymp_di\" bpmnElement=\"Flow_1ibjymp\"><di:waypoint x=\"816\" y=\"258\" /><di:waypoint x=\"838\" y=\"258\" /><di:waypoint x=\"838\" y=\"190\" /><di:waypoint x=\"870\" y=\"190\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_19uxd9r_di\" bpmnElement=\"Flow_19uxd9r\"><di:waypoint x=\"970\" y=\"320\" /><di:waypoint x=\"1070\" y=\"320\" /><di:waypoint x=\"1070\" y=\"298\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1dm36u1_di\" bpmnElement=\"Flow_1dm36u1\"><di:waypoint x=\"1120\" y=\"258\" /><di:waypoint x=\"1155\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_00wo7mm_di\" bpmnElement=\"Flow_00wo7mm\"><di:waypoint x=\"1205\" y=\"258\" /><di:waypoint x=\"1252\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1220\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0jm9k12_di\" bpmnElement=\"Flow_0jm9k12\"><di:waypoint x=\"1180\" y=\"283\" /><di:waypoint x=\"1180\" y=\"332\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1189\" y=\"305\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0lioopv_di\" bpmnElement=\"Flow_0lioopv\"><di:waypoint x=\"816\" y=\"258\" /><di:waypoint x=\"838\" y=\"258\" /><di:waypoint x=\"838\" y=\"320\" /><di:waypoint x=\"870\" y=\"320\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0jrs4l2_di\" bpmnElement=\"Flow_0jrs4l2\"><di:waypoint x=\"970\" y=\"190\" /><di:waypoint x=\"1070\" y=\"190\" /><di:waypoint x=\"1070\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Activity_1ld00yp_di\" bpmnElement=\"Activity_1ld00yp\"><dc:Bounds x=\"550\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_168041r_di\" bpmnElement=\"Group_168041r\"><dc:Bounds x=\"710\" y=\"20\" width=\"660\" height=\"440\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1002\" y=\"27\" width=\"85\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_0p2eg1m\" bpmnElement=\"Group_04vv671\"><dc:Bounds x=\"190\" y=\"20\" width=\"490\" height=\"440\" /><bpmndi:BPMNLabel><dc:Bounds x=\"394\" y=\"27\" width=\"84\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"DataInputAssociation_17r5rlk_di\" bpmnElement=\"DataInputAssociation_17r5rlk\"><di:waypoint x=\"361\" y=\"342\" /><di:waypoint x=\"360\" y=\"298\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0pdno6e_di\" bpmnElement=\"Flow_0pdno6e\"><di:waypoint x=\"278\" y=\"258\" /><di:waypoint x=\"310\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0hrntp0_di\" bpmnElement=\"Flow_0hrntp0\"><di:waypoint x=\"410\" y=\"258\" /><di:waypoint x=\"445\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1rh9p75_di\" bpmnElement=\"Flow_1rh9p75\"><di:waypoint x=\"470\" y=\"283\" /><di:waypoint x=\"470\" y=\"349\" /><bpmndi:BPMNLabel><dc:Bounds x=\"479\" y=\"312\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0yj7ww3_di\" bpmnElement=\"Flow_0yj7ww3\"><di:waypoint x=\"495\" y=\"258\" /><di:waypoint x=\"550\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"514\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0ofbzrz_di\" bpmnElement=\"Flow_0ofbzrz\"><di:waypoint x=\"650\" y=\"258\" /><di:waypoint x=\"740\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0rkhxxk_di\" bpmnElement=\"Flow_0rkhxxk\"><di:waypoint x=\"1330\" y=\"258\" /><di:waypoint x=\"1412\" y=\"258\" /></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn2:definitions>",
					"ElementParameters": "[{\"Id\":\"FrendsTestElementId\",\"Type\":19,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Test\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1ilu88r\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"Data was successfully written into table {{#var.TableName}} ({{(#result[Parse JSON].Jtoken as JArray).Count}} rows inserted).\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_09qut53\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Execute INSERT Statement].Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Was the insert successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_143fjei\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An error occurred inserting the data into {{#var.TableName}}.\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"StartEvent_1\",\"Type\":0,\"Parameters\":{},\"SelectedTypeId\":\"ManualTrigger\",\"PromoteResultAs\":null,\"Name\":\"Manual Trigger\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1t3j2vx\",\"Type\":1,\"Parameters\":{\"input\":{\"Path\":{\"mode\":\"text\",\"value\":\"{{#var.FilePath}}{{#var.FileName}}\"},\"FileEncoding\":{\"mode\":\"select\",\"value\":\"ANSI\"},\"EnableBom\":{\"mode\":\"toggle\",\"value\":false},\"EncodingInString\":{\"mode\":\"text\",\"value\":\"\"}},\"connection\":{\"ConnectionTimeout\":{\"mode\":\"integer\",\"value\":60},\"Address\":{\"mode\":\"csharp\",\"value\":\"#var.ServerAddress\"},\"Port\":{\"mode\":\"integer\",\"value\":22},\"Authentication\":{\"mode\":\"select\",\"value\":\"UsernamePassword\"},\"Username\":{\"mode\":\"csharp\",\"value\":\"#var.ServerUser\"},\"Password\":{\"mode\":\"csharp\",\"value\":\"#var.ServerPassword\"},\"PrivateKeyFile\":{\"mode\":\"text\",\"value\":\"\"},\"PrivateKeyString\":{\"mode\":\"text\",\"value\":\"\"},\"PrivateKeyPassphrase\":{\"mode\":\"text\",\"value\":\"\"},\"ServerFingerPrint\":{\"mode\":\"text\",\"value\":\"\"},\"HostKeyAlgorithm\":{\"mode\":\"select\",\"value\":\"Any\"},\"UseKeyboardInteractiveAuthentication\":{\"mode\":\"toggle\",\"value\":false},\"PromptAndResponse\":[],\"BufferSize\":{\"mode\":\"integer\",\"value\":32}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/7fe311ed-3e37-4669-8c6b-9e5792e996d0/v1\",\"PromoteResultAs\":null,\"Name\":\"Read JSON file from SFTP\",\"Description\":\"Reads the JSON file from the SFTP server.\",\"IsDefault\":null,\"ShouldRetry\":true,\"MaxRetryCount\":3,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_14nb58k\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"!string.IsNullOrEmpty(#result[Read JSON file from SFTP].Content)\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"File read successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataObjectReference_0ksp4rn\",\"Type\":21,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"JSON file\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0c1ctz8\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An error occured reading the input file {{#var.FileName}} from SFTP server {{#var.ServerAddress}}.\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1rh9p75\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1bt2saf\",\"Type\":13,\"Parameters\":{},\"SelectedTypeId\":\"\",\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1qerhv6\",\"Type\":10,\"Parameters\":{\"variable\":\"dataRow\",\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Parse JSON].Jtoken\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"For each data row\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0yj7ww3\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1ld00yp\",\"Type\":1,\"Parameters\":{\"input\":{\"Json\":{\"mode\":\"text\",\"value\":\"{{#result[Read JSON file from SFTP].Content}}\"}}},\"SelectedTypeId\":\"/ProcessTask/fc3f0ffd-4f6d-4a54-8d19-ef4d00a6b1a6/v2\",\"PromoteResultAs\":null,\"Name\":\"Parse JSON\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0iji20v\",\"Type\":1,\"Parameters\":{\"query\":{\"ConnectionString\":{\"mode\":\"csharp\",\"value\":\"#var.ConnectionString\"},\"CommandText\":{\"mode\":\"csharp\",\"value\":\"#var.query\"},\"Parameters\":{\"mode\":\"csharp\",\"value\":\"#var.queryParameters\"}},\"options\":{\"TimeoutSeconds\":{\"mode\":\"integer\",\"value\":30},\"MySqlTransactionIsolationLevel\":{\"mode\":\"select\",\"value\":\"RepeatableRead\"}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/868569a3-ccba-4d1d-8ac1-59ad6ae6cf46/v2\",\"PromoteResultAs\":null,\"Name\":\"Execute INSERT Statement\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":true,\"MaxRetryCount\":3,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_17dg0px\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    var sqlColumns = \\\"\\\";\\n    var sqlValues = \\\"\\\";\\n\\n    foreach(JProperty property in #var.dataRow)\\n    {\\n        sqlColumns += $\\\"{property.Name}, \\\";\\n        sqlValues += $\\\"@{property.Name}, \\\";\\n    }\\n\\n    // Remove trailing commas\\n    sqlColumns = sqlColumns.Remove(sqlColumns.Length - 2, 2);\\n    sqlValues = sqlValues.Remove(sqlValues.Length - 2, 2);\\n\\n    return $\\\"INSERT INTO {#var.TableName} ({sqlColumns}) \\\" +\\n           $\\\"VALUES ({sqlValues})\\\";\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"query\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create query\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_06yxlvm\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    var parameters = new List<Frends.MySQL.ExecuteQuery.Definitions.Parameter>();\\n    foreach(JProperty property in #var.dataRow)\\n    {\\n        var parameter = new Frends.MySQL.ExecuteQuery.Definitions.Parameter\\n        {\\n            Name = property.Name,\\n            Value = property.Value.ToString()\\n        };\\n        parameters.Add(parameter);\\n    }\\n\\n    return parameters.ToArray();\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"queryParameters\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create query parameters\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0otsupi\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_00wo7mm\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0jm9k12\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null}]",
					"ManualTriggerJson": "[]",
					"IsSubprocess": false,
					"TriggersJson": "[{\"$type\":\"ManualTrigger\",\"config\":{},\"name\":\"Manual Trigger\",\"id\":\"StartEvent_1\",\"shouldNotLogParameters\":null}]",
					"AssemblyName": null,
					"PackageId": null,
					"PackageVersion": null,
					"UsedTasksJson": "[\"/ProcessTask/7FE311ED-3E37-4669-8C6B-9E5792E996D0/v1\",\"/ProcessTask/FC3F0FFD-4F6D-4A54-8D19-EF4D00A6B1A6/v2\",\"/ProcessTask/868569A3-CCBA-4D1D-8AC1-59AD6AE6CF46/v2\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.2.1685",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 1,
					"MinorVersion": 0,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"a2c2158f-dcb0-442b-8479-a65834c912af": [
						{
							"Id": "7fe311ed-3e37-4669-8c6b-9e5792e996d0",
							"PackageId": "Frends.SFTP.ReadFile",
							"PackageVersion": "2.1.0",
							"Name": "Frends.SFTP.ReadFile.SFTP.ReadFile(Input, Connection, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "fc3f0ffd-4f6d-4a54-8d19-ef4d00a6b1a6",
							"PackageId": "Frends.JSON.ConvertJSONStringToJToken",
							"PackageVersion": "1.0.1",
							"Name": "Frends.JSON.ConvertJSONStringToJToken.JSON.ConvertJSONStringToJToken(Input)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "868569a3-ccba-4d1d-8ac1-59ad6ae6cf46",
							"PackageId": "Frends.MySQL.ExecuteQuery",
							"PackageVersion": "1.1.0",
							"Name": "Frends.MySQL.ExecuteQuery.MySQL.ExecuteQuery(QueryInput, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						}
					]
				},
				"LinkedSubProcess": {},
				"Version": "Acc41"
			}
		}
	]
}